<extend name="Public:comment" />

<block name="title">购物车</block>

<block name="css">
	<link rel="stylesheet" href="/Application/Home/Common/css/base.css" type="text/css" />
	<link rel="stylesheet" href="/Application/Home/Common/css/shop_common.css" type="text/css" />
	<link rel="stylesheet" href="/Application/Home/Common/css/shop_header.css" type="text/css" />
	<link rel="stylesheet" href="/Application/Home/Common/css/shop_gouwuche.css" type="text/css" />
	<style type="text/css">
    .shop_bd_shdz_title{width:1000px; margin-top: 10px; height:50px; line-height: 50px; overflow: hidden; background-color:#F8F8F8;}
    .shop_bd_shdz_title h3{width:120px; text-align: center; height:40px; line-height: 40px; font-size: 14px; font-weight: bold;  background:#FFF; border:1px solid #E8E8E8; border-radius:4px 4px 0 0; float: left;  position: relative; top:10px; left:10px; border-bottom: none;}
    .shop_bd_shdz_title p{float: right;}
    .shop_bd_shdz_title p a{margin:0 8px; color:#555555;}

	.shop_bd_shdz_lists{width:1000px;}
	.shop_bd_shdz_lists ul{width:1000px;}
	.shop_bd_shdz_lists ul li{width:980px; border-radius: 3px; margin:5px 0; padding-left:18px; line-height: 40px; height:40px; border:1px solid #FFE580; background-color:#FFF5CC;}
	.shop_bd_shdz_lists ul li label{color:#626A73; font-weight: bold;}
	.shop_bd_shdz_lists ul li label span{padding:10px;}
	.shop_bd_shdz_lists ul li em{margin:0 4px; color:#626A73;}

	.shop_bd_shdz{width:1000px; margin:10px auto 0;}
	.shop_bd_shdz_new{border:1px solid #ccc; width:998px;}
	.shop_bd_shdz_new div.title{width:990px; padding-left:8px; line-height:35px; height:35px; border-bottom:1px solid #ccc; background-color:#F2F2F2; font-color:#656565; font-weight: bold; font-size:14px;}
	.shdz_new_form{width:980px; padding:9px;}
	.shdz_new_form ul{width:100%;}
	.shdz_new_form ul li{clear:both; width:100%; padding:5px 0; height:25px; line-height: 25px;}
	.shdz_new_form ul li label{float:left;width:100px; text-align: right; padding-right: 10px;}
	.shdz_new_form ul li label span{color:#f00; font-weight: bold; font-size:14px; position: relative; left:-3px; top:2px;}
	.admin_shdz_btn{float:right;margin-right:40px;}
	.admin_shdz_btn a{margin-left:10px;}
    </style>
</block>

<block name="js">
	<script type="text/javascript" src="/Application/Home/Common/js/jquery.js" ></script>
    <script type="text/javascript" src="/Application/Home/Common/js/topNav.js" ></script>
    <script type="text/javascript" src="/Application/Home/Common/js/jquery.goodnums.js" ></script>
    <script type="text/javascript" src="/Application/Home/Common/js/shop_gouwuche.js" ></script>
    <script type="text/javascript">
	jQuery(function(){
		jQuery("#new_add_shdz_btn").toggle(function(){
			jQuery("#new_add_shdz_contents").show(500);
		},function(){
			jQuery("#new_add_shdz_contents").hide(500);
		});
	});
	</script>
	<script type="text/javascript">
		$(function(){
			$(".select1").change(function(){
				var fid = $(this).val();
				console.log(fid);
				$.ajax({
					type:"get",
					url:"{:U('User/placename')}",
					data:{fid:fid},
					success:function(msg){
						if(msg.status==1){
							$(".select2").html("");
							$(".select2").append(msg.data);
						}
					}
				});
			});

			$(".select2").change(function(){
				var fid = $(this).val();
				console.log(fid);
				$.ajax({
					type:"get",
					url:"{:U('User/placename3')}",
					data:{fid:fid},
					success:function(msg){
						if(msg.status==1){
							$(".select3").html("");
							$(".select3").append(msg.data);
						}
					}
				});
			});

			$(".res_radio").click(function(){
				var ind = $(".res_radio").index($(this));
				var id = $(".res_li").eq(ind).attr("data-id");
				$(".op").attr('href','order_success1?id='+id);
			});
		});
	</script>
</block>

<block name="shouye">
	<div id="shop_hd_menu_all_category" class="shop_hd_menu_all_category"><!-- 首页去掉 id="shop_hd_menu_all_category" 加上clsss shop_hd_menu_hover -->
</block>

<block name="content">
	<!-- 面包屑 注意首页没有 -->
	<div class="shop_hd_breadcrumb">
		<strong>当前位置：</strong>
		<span>
			<a href="">首页</a>&nbsp;›&nbsp;
			<a href="">我的商城</a>&nbsp;›&nbsp;
			<a href="">我的购物车</a>
		</span>
	</div>
	<div class="clear"></div>
	<!-- 面包屑 End -->

	<!-- Header End -->
	
	<!-- 购物车 Body -->
	<div class="shop_gwc_bd clearfix">
		<div class="shop_gwc_bd_contents clearfix">

			<!-- 购物流程导航 -->
			<div class="shop_gwc_bd_contents_lc clearfix">
				<ul>
					<li class="step_a">确认购物清单</li>
					<li class="step_b hover_b">确认收货人资料及送货方式</li>
					<li class="step_c">购买完成</li>
				</ul>
			</div>
			<!-- 购物流程导航 End -->
			<div class="clear"></div>
			<!-- 收货地址 title -->
			<div class="shop_bd_shdz_title">
				<h3>收货人地址</h3>
				<p><a href="javasrcipt:void(0);" id="new_add_shdz_btn">新增收货地址</a><a href="javascript:void(0);">管理收货地址</a></p>
			</div>
			<div class="clear"></div>
			<!-- 收货人地址 Title End -->
			<div class="shop_bd_shdz clearfix">
				<div class="shop_bd_shdz_lists clearfix">
					<ul>
						<foreach name="res" item="v">
						<li class="res_li" data-id="{$v['id']}"><label>寄送至：<span><input class="res_radio" type="radio" name="shdz" /></span></label><em>{$v.address1}</em><em>{$v.address2}</em><em>{$v.address3}</em><em>{$v.address}</em><em>{$v.name}(收)</em><em>{$v.mobel_phone}</em><span class="admin_shdz_btn"><a href="{:U('User/address_update',array('id'=>$v['id']))}">编辑</a><a href="{:U('User/address_delete',array('id'=>$v['id']))}">删除</a></span></li>
						</foreach>
					</ul>
				</div>
				<!-- 新增收货地址 -->
				<div id="new_add_shdz_contents" style="display:none;" class="shop_bd_shdz_new clearfix">
					<div class="title">新增收货地址</div>
					<div class="shdz_new_form">
						<form action="{:U('flow2_address')}" method="post">
							<ul>
								<li><label for=""><span>*</span>收货人姓名：</label><input type="text" name="name" class="name" /></li>
								<li><label for=""><span>*</span>所在地址：</label>
									<select name="address1" class="select1">
											<option value="">请选择</option>
										<foreach name="placename" item="p">
											<option value="{$p['id']}">{$p.name}</option>
										</foreach>
									</select>
									<select name="address2" class="select2">
											<option value="">请选择</option>
										<foreach name="placename2" item="v">
											<option value="{$p['id']}">{$p.name}</option>
										</foreach>
									</select>
									<select name="address3" class="select3">
											<option value="">请选择</option>
										<foreach name="placename3" item="v">
											<option value="{$p['id']}">{$p.name}</option>
										</foreach>
									</select>
								</li>
								<li><label for=""><span>*</span>详细地址：</label><input type="text" name="address" class="xiangxi" /></li>
								<li><label for=""><span></span>邮政编码：</label><input type="text" name="postalcode" class="youbian" /></li>
								<li><label for=""><span></span>电话：</label><input type="text" name="phone" class="dianhua" /></li>
								<li><label for=""><span></span>手机号：</label><input type="text" name="mobel_phone" class="shouji" /></li>
								<li><label for="">&nbsp;</label><input type="submit" value="添加收货地址" /></li>
							</ul>
						</from>
					</div>
				</div>
				<!-- 新增收货地址 End -->
			</div>
			<div class="clear"></div>
			<!-- 购物车列表 -->
			<table>
				<tfoot>
					<tr>
						<td colspan="6">
							<div class="gwc_foot_zongjia">商品总价(不含运费)<span>￥<strong id="good_zongjia">12750.00</strong></span></div>
							<div class="clear"></div>
							<div class="gwc_foot_links">
								<a href="{:U('flow')}" class="go">返回上一步</a>
								<a href="{:U('order_success1')}" class="op">确认收货地址</a>
							</div>
						</td>
					</tr>
				</tfoot>
			</table>
			<!-- 购物车列表 End -->

		</div>
	</div>
	<!-- 购物车 Body End -->
</block>